package com.example.beidouapplication;

import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import androidx.annotation.Nullable;


public class FragmentSysParaInfo extends Fragment {

    Button btn1;
    Button btn2;

    static FragmentSysParaInfo instance = new FragmentSysParaInfo();

    @Override
    public View onCreateView(
            LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState
    ) {

        View inflate = inflater.inflate(R.layout.fragment_sys_para_info, container, false);
        return inflate;
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        btn1 = (Button) getActivity().findViewById(R.id.btn_SysParaInfo_row1);
        btn1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {


                android.app.FragmentTransaction ft = getFragmentManager().beginTransaction();
                ft.replace(R.id.contentFrame, FragmentSysParaInfoSet.instance);
                ft.commit();
                MainActivity.sendKey(1);

            }
        });

        btn2 = (Button) getActivity().findViewById(R.id.btn_SysParaInfo_row2);
        btn2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {


                MainActivity.sendKey(2);

            }
        });
    }


}